function f(...params) {
    console.log(this.a + ' ' + this.b + ' ' + this.c + ' ' + this.d, "参数", ...params)
}
var obj = {
    a: 1,
    b: 2,
    params: 1
}
var o1 = {
    c: 666
}
var o2 = {
    d: "ddd"
}

console.log('--------call------')
f()
f.call(obj)
f.call(o2)
f.call(obj, [o1.c, o2.d])
f.call(obj, o1.c, o2.d)

console.log('------apply--------')
f()
f.apply(obj)
f.apply(obj, o1, o2)
f.apply(obj, [o1, o2])
console.log('-------bind-------')
f()
f.bind(obj)()
f.bind(obj, o1, o2)()
f.bind(obj, [o1, o2])()